package com.mall.service.order.controller;

import com.mall.commons.common.CommonResult;
import com.mall.model.domain.OmsCompanyAddress;
import com.mall.service.order.service.CompanyAddressService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/companyAddress")
@Slf4j
public class CompanyAddressController {
    @Autowired
    private CompanyAddressService companyAddressService;
    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public CommonResult<List<OmsCompanyAddress>> list(){
        List<OmsCompanyAddress> list = companyAddressService.list();
        return CommonResult.success(list);
    }

}
